package com.bossien.flink.common.sqlcommand;

import java.lang.reflect.Constructor;
import java.lang.reflect.Executable;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.ArrayList;
import java.util.List;

public class ParamNameUtil {

    public static List<String> getParamNames(Method method) {
        return getParameterNames(method);
    }

    public static List<String> getParamNames(Constructor<?> constructor) {
        return getParameterNames(constructor);
    }

    private static List<String> getParameterNames(Executable executable) {
        List<String> names = new ArrayList();
        Parameter[] params = executable.getParameters();
        Parameter[] var3 = params;
        int var4 = params.length;

        for(int var5 = 0; var5 < var4; ++var5) {
            Parameter param = var3[var5];
            names.add(param.getName());
        }

        return names;
    }

    private ParamNameUtil() {
    }
}
